home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 September (Japanese) / CICA Shareware for Windows CD-ROM (Walnut Creek) (September 1995) (Japanese) (Disc 2).iso / disc2 / patches / symantec / rtlinc.exe / FLOAT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-16  |  2.7 KB  |  121 lines

  1. /*_ float.h   Thu Dec  6 1990 */
  2. /* Implementation limits            */
  3.  
  4. #ifndef __FLOAT_H
  5. #define __FLOAT_H    1
  6.  
  7. #if __cplusplus
  8. extern "C" {
  9. #endif
  10.  
  11. #ifdef __STDC__
  12. #define __CDECL
  13. #define __STDCALL
  14. #else
  15. #define __CDECL __cdecl
  16. #define __STDCALL __stdcall
  17. #endif
  18.  
  19. #if __OS2__ && __INTSIZE == 4
  20. #define __CLIB    __STDCALL
  21. #else
  22. #define __CLIB    __CDECL
  23. #endif
  24.  
  25. #define    DBL_DIG        15
  26. #define DBL_EPSILON    0x1p-52        /* 2.2204460492503131e-16    */
  27. #define DBL_MANT_DIG    53
  28. #define DBL_MAX_10_EXP    308
  29. #define    DBL_MAX_EXP    1024
  30. #define DBL_MIN_10_EXP    -307
  31. #define    DBL_MIN_EXP    -1021
  32.  
  33. #if 1
  34. #if __SC__ < 0x220
  35. #define DBL_MAX     1.7976931348623157e+308
  36. #else
  37. #define DBL_MAX     0x1.FFFFFFFFFFFFFp1023
  38. #endif
  39. #define DBL_MIN     2.2250738585072014e-308
  40. #define FLT_MAX     3.402823466e+38F
  41. #define FLT_MIN     1.175494351e-38F
  42. #else
  43. extern double __CDECL DBL_MAX;
  44. extern double __CDECL DBL_MIN;
  45. extern float __CDECL FLT_MAX;
  46. extern float __CDECL FLT_MIN;
  47. #endif
  48.  
  49. #define    FLT_DIG        6
  50. #define FLT_EPSILON    1.19209290e-7f
  51. #define FLT_MANT_DIG    24
  52. #define FLT_MAX_10_EXP    38
  53. #define    FLT_MAX_EXP    128
  54. #define FLT_MIN_10_EXP    -37
  55. #define    FLT_MIN_EXP    -125
  56. #define    FLT_RADIX    2
  57.  
  58. extern int __CLIB __flt_rounds(void);
  59. #define    FLT_ROUNDS    (__flt_rounds())
  60.  
  61. #define    LDBL_DIG    DBL_DIG
  62. #define LDBL_EPSILON    DBL_EPSILON
  63. #define LDBL_MANT_DIG    DBL_MANT_DIG
  64. #define LDBL_MAX    DBL_MAX
  65. #define LDBL_MAX_10_EXP    DBL_MAX_10_EXP
  66. #define    LDBL_MAX_EXP    DBL_MAX_EXP
  67. #define LDBL_MIN    DBL_MIN
  68. #define LDBL_MIN_10_EXP    DBL_MIN_10_EXP
  69. #define    LDBL_MIN_EXP    DBL_MIN_EXP
  70.  
  71. #ifndef __STDC__
  72.  
  73. /* Non-ANSI functions to support the 8087    */
  74.  
  75. extern int __cdecl _8087;
  76. unsigned    __CLIB _status87(void);
  77. unsigned    __CLIB _clear87(void);
  78. unsigned    __CLIB _control87(unsigned, unsigned);
  79. void        __CLIB _fpreset(void);
  80.  
  81. #define _MCW_EM     0x003f        /* interrupt Exception Masks */
  82. #define _EM_INVALID    0x0001        
  83. #define _EM_DENORMAL    0x0002        
  84. #define _EM_ZERODIVIDE    0x0004        
  85. #define _EM_OVERFLOW    0x0008        
  86. #define _EM_UNDERFLOW    0x0010        
  87. #define _EM_INEXACT    0x0020    
  88.  
  89. #define _MCW_IC     0x1000        /* Infinity Control */
  90. #define _IC_AFFINE    0x1000        
  91. #define _IC_PROJECTIVE    0x0000        
  92.  
  93. #define _MCW_RC     0x0c00        /* Rounding Control */
  94. #define _RC_CHOP    0x0c00    
  95. #define _RC_UP        0x0800        
  96. #define _RC_DOWN    0x0400
  97. #define _RC_NEAR    0x0000        
  98.  
  99. #define _MCW_PC     0x0300        /* Precision Control */
  100. #define _PC_24        0x0000        
  101. #define _PC_53        0x0200        
  102. #define _PC_64        0x0300        
  103.  
  104. #define _CW_DEFAULT (_RC_NEAR | _IC_AFFINE | _EM_DENORMAL | _EM_UNDERFLOW | _EM_INEXACT | _PC_64)
  105.  
  106. /* Compatibility macros */
  107. #define MCW_PC        _MCW_PC
  108. #define CW_DEFAULT    _CW_DEFAULT
  109.  
  110. #endif
  111.  
  112. #ifdef __FPCE__
  113. #define DECIMAL_DIG    17
  114. #endif
  115.  
  116. #if __cplusplus
  117. }
  118. #endif
  119.  
  120. #endif /* __FLOAT_H */
  121.